package com.ph.shopping.facade.permission.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.ph.shopping.common.core.base.BaseService;
import com.ph.shopping.common.core.customenum.ResultEnum;
import com.ph.shopping.common.util.result.Result;
import com.ph.shopping.facade.agent.entity.Agent;
import com.ph.shopping.facade.mapper.SafeManageMapper;
import com.ph.shopping.facade.merchant.entity.Merchant;
import com.ph.shopping.facade.permission.service.ISafeManageService;
import com.ph.shopping.facade.supplier.entity.Supplier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @项目：phshopping-service-permission
 * @描述：
 * @作者： ShuHao
 * @创建时间：2017-03-15
 * @Copyright @2017 by ShuHao
 */
@Component
@Service(version = "1.0.0")
public class SafeManageService extends BaseService implements ISafeManageService {

    private static final Logger logger = LoggerFactory.getLogger(SafeManageService.class);

    @Autowired
    SafeManageMapper safeManageMapper;

    @Override
    public Result updateAgent(Agent agent) {
        safeManageMapper.updateAgent(agent);
        return getResult(ResultEnum.SUCCESS);
    }

    @Override
    public Result updateMerchant(Merchant merchant) {
        safeManageMapper.updateMerchant(merchant);
        return getResult(ResultEnum.SUCCESS);
    }

    @Override
    public Result updateSupplier(Supplier supplier) {
        safeManageMapper.updateSupplier(supplier);
        return getResult(ResultEnum.SUCCESS);
    }
}
